﻿using System;
using System.Text;
using System.Collections.Generic;
using System.Linq;
using Microsoft.VisualStudio.TestTools.UnitTesting;

namespace Inspired.Euler.Tests
{
    /// <summary>
    /// Tests for problems from 10 to 19
    /// </summary>
    [TestClass]
    public class Problems010To019
    {
        [TestMethod]
        [Description("Calculate the sum of all the primes below two million.")]
        public void Problem010()
        {
            Assert.AreEqual(142913828922, Euler.Problem010.Solve());
        }
 
        [TestMethod]
        [Description("What is the greatest product of four numbers on the same straight line in the 20 by 20 grid?")]
        public void Problem011()
        {
            Assert.AreEqual(70600674, Euler.Problem011.Solve());
        }
 
        [TestMethod]
        [Description("What is the value of the first triangle number to have over five hundred divisors?")]
        public void Problem012()
        {
            Assert.AreEqual(76576500, Euler.Problem012.Solve());
        }
 
        [TestMethod]
        [Description("Find the first ten digits of the sum of one-hundred 50-digit numbers.")]
        public void Problem013()
        {
            Assert.AreEqual(5537376230, Euler.Problem013.Solve());
        }
 
        [TestMethod]
        [Description("Find the longest sequence using a starting number under one million.")]
        public void Problem014()
        {
            Assert.AreEqual(837799, Euler.Problem014.Solve());
        }
 
        [TestMethod]
        [Description("Starting in the top left corner in a 20 by 20 grid, how many routes are there to the bottom right corner?")]
        public void Problem015()
        {
            Assert.AreEqual(137846528820, Euler.Problem015.Solve());
        }
 
        [TestMethod]
        [Description("What is the sum of the digits of the number 2<sup>1000</sup>?")]
        public void Problem016()
        {
            Assert.AreEqual(1366, Euler.Problem016.Solve());
        }
 
        [TestMethod]
        [Description("How many letters would be needed to write all the numbers in words from 1 to 1000?")]
        public void Problem017()
        {
            Assert.AreEqual(21124, Euler.Problem017.Solve());
        }
 
        [TestMethod]
        [Description("Find the maximum sum travelling from the top of the triangle to the base.")]
        public void Problem018()
        {
            Assert.AreEqual(1074, Euler.Problem018.Solve());
        }
 
        [TestMethod]
        [Description("How many Sundays fell on the first of the month during the twentieth century?")]
        public void Problem019()
        {
            Assert.AreEqual(171, Euler.Problem019.Solve());
        }
     }
}
